import React from "react";
import ReactDOM  from "react-dom/client";
import {BrowserRouter,HashRouter} from 'react-router-dom'
import { Provider } from "react-redux";
import {ConfigProvider} from 'antd'
import zhCN from 'antd/es/locale/zh_CN'
import { Route,Routes } from 'react-router-dom'

import store from "./store";
import App from "./App";
//利用变量切换不同路由类型
const Router = process.env.NODE_ENV === 'production' ? BrowserRouter : HashRouter

const root = ReactDOM.createRoot(document.querySelector('#app'))

root.render(
    <ConfigProvider locale={zhCN}>
        <Provider store={store}>
            <Router>
                <App/>
            </Router>
        </Provider>
    </ConfigProvider>
)